using System;
using System.Collections.Generic;
using System.Text;

using System.Configuration;

namespace Cafechess.Chess.Engines
{
#if NET10 || NET11

  class ChessEngineInterfaceSection
  {
  }

#else
  public class ChessEngineInterfaceSection : ConfigurationSection
  {
    // The collection (property bag) that conatains 
    // the section properties.
    private static ConfigurationPropertyCollection _Properties;
    ConfigurationProperty coValue = new ConfigurationProperty("value", typeof(string));
    ConfigurationProperty coSettings = new ConfigurationProperty(null, typeof(KeyValueConfigurationCollection), null, ConfigurationPropertyOptions.IsDefaultCollection);
    public ChessEngineInterfaceSection()
    {

      // Property initialization
      _Properties =
          new ConfigurationPropertyCollection();
      _Properties.Add(coValue);
      _Properties.Add(coSettings);
    }
    public string Value
    {
      get { return (string)this["value"]; }
      set { this["value"] = value; }
    }
    public KeyValueConfigurationCollection Parameters
    {
      get { return (KeyValueConfigurationCollection)this[coSettings]; }
    }
    // This is a key customization. 
    // It returns the initialized property bag.
    protected override ConfigurationPropertyCollection Properties
    {
      get
      {
        return _Properties;
      }
    }
  }
#endif
}
